home *** CD-ROM | disk | FTP | other *** search
- ******* ibox.lib/SetupImageIBox *********************************************
- *
- * NAME
- * SetupImageIBox -- Compute coordinates for BOOPSI image class
- *
- * SYNOPSIS
- * SetupImageIBox( image, imp_draw, result )
- * a0 a1 a2
- *
- * void __asm SetupImageIBox( register __a0 struct Image *,
- * register __a1 struct impDraw *,
- * register __a2 struct IBox * );
- *
- * FUNCTION
- * This function calculates the extent box for a BOOPSI image,
- * taking the IM_DRAWFRAME message into account for dynamic boxes.
- *
- * INPUTS
- * image - pointer to the Image structure
- * imp_draw - pointer to the impDraw message
- * result - where to place the resulting box.
- *
- * EXAMPLE
- *
- * NOTES
- *
- * BUGS
- *
- * SEE ALSO
- * intuition/intuition.h
- *
- *****************************************************************************
- * Written by Talin
- *
- include "exec/types.i"
- include "intuition/intuition.i"
- include "intuition/imageclass.i"
-
- SECTION text,CODE
-
- xdef _SetupImageIBox
-
- _SetupImageIBox
- move.l ig_LeftEdge(a0),ibox_Left(a2)
- move.l ig_Width(a0),ibox_Width(a2)
-
- move.w impd_OffsetX(a1),d1
- add.w d1,ibox_Left(a2)
- move.w impd_OffsetY(a1),d1
- add.w d1,ibox_Top(a2)
-
- cmp.l #IM_DRAWFRAME,(a1)
- blt.s 1$
- move.w impd_DimensionsWidth(a1),ibox_Width(a2)
- move.w impd_DimensionsHeight(a1),ibox_Height(a2)
-
- 1$ rts
-
- end
-